﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MINERP.DisjoinProForOutShop.Forms
{
    public partial class FrmMarkSure : Form
    {
        public FrmMarkSure(int intDisplay)
        {
         
            InitializeComponent();
            intisDispaly = intDisplay;
        }

        private int intisDispaly = 0;
        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            
            this.Close();
        }

        private void FrmMarkSure_Load(object sender, EventArgs e)
        {
            if(intisDispaly==1)
            {
                checkBoxIsPrint.Visible = true;
                this.label1.Visible = true;
                this.numericUpDownPay.Visible = true;
            }
            else
            {
                checkBoxIsPrint.Visible = false;
                this.label1.Visible = false;
                this.numericUpDownPay.Visible = false;
            }
            bool isCheck = Properties.Settings.Default.IsPrintFaHuo;
            if (isCheck)
            {
                checkBoxIsPrint.Checked = true;
            }
            else
            {
                checkBoxIsPrint.Checked = false;
            }
        }

        private void checkBoxIsPrint_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBoxIsPrint.Checked)
            {
                Properties.Settings.Default.IsPrintFaHuo = true;
                
            }
            else
            {
                Properties.Settings.Default.IsPrintFaHuo = false;
            }
            Properties.Settings.Default.Save();
        }
    }
}
